# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt


# roc_auc = auc(fpr,tpr) ###计算auc的值

lw = 2

plt.xticks([2,4,6,8,10],fontsize=20)
plt.xticks([2,4,6,8,10],fontsize=20)
plt.yticks([0,10,20,30,40,50,60,70,80,90],fontsize=20)
plt.xlim([0.0,10])
plt.ylim([0, 90])

fpr_umdl=np.array([1,5,10])
tpr_umdl=np.array([34.5	,52.6,59.6])
fpr_pul=np.array([1,5,10])
tpr_pul=np.array([45.5,60.7,66.7])
fpr_tj_aidl=np.array([1,5,10])
tpr_tj_aidl=np.array([58.2,74.8,81.1])
fpr_ptgan=np.array([1,5,10])
tpr_ptgan=np.array([38.6,57.6,66.1])
fpr_spgan=np.array([1,5,10])
tpr_spgan=np.array([57.7,75.8,82.4])
fpr_hhl=np.array([1,5,10])
tpr_hhl=np.array([66.2,78.8,84])
fpr_arn=np.array([1,5,10])
tpr_arn=np.array([70.3,80.4,86.3])
fpr_dcr=np.array([1,5,10])
tpr_dcr=np.array([72.8,84.9,89.7])

plt.plot(fpr_umdl,tpr_umdl, 
         lw=lw, label='UMDL',marker='o')
plt.plot(fpr_pul,tpr_pul,
         lw=lw, label='PUL',marker='<')
plt.plot(fpr_tj_aidl,tpr_tj_aidl, 
         lw=lw, label='TJ-AIDL',marker='+')
plt.plot(fpr_ptgan,tpr_ptgan, 
	     lw=lw, label='PTGN',marker='h')
plt.plot(fpr_spgan,tpr_spgan, 
	     lw=lw, label='SPGAN',marker='1')
plt.plot(fpr_hhl,tpr_hhl, 
	     lw=lw, label='HHL',marker='s')
plt.plot(fpr_arn,tpr_arn, 
	     lw=lw, label='ARN',marker='>')
plt.plot(fpr_dcr,tpr_dcr, 
	     lw=lw, label='DCR',marker='*')
# plt.plot([0, 1], [0, 1], color='navy', lw=lw, linestyle='--')

plt.xlabel('Rank score',fontsize=20)
plt.ylabel('Matching rate(%)',fontsize=20)
plt.title('Train on D and test on M',fontsize=20)
plt.legend(loc="lower right",fontsize=15,ncol=2)
plt.savefig('D-M', bbox_inches='tight')